<template>
  <div>
    <h5>子组件</h5>
    <p>子组件{{ value }}</p>
    <button @click="add">点击加一</button>
  </div>
</template>

<script>
export default {
  props: ['value'],
  methods: {
    add() {
      this.$emit('input', this.value + 1)
    }
  }
}
</script>

<style>

</style>
